package com.zmn.oms.services.impl.conf.workturn.bizmode.log;

import com.zmn.oms.model.entity.conf.workturn.bizmode.log.PlatBizModeLog;
import com.zmn.oms.model.entity.conf.workturn.bizmode.log.PlatBizModeLogQuery;
import com.zmn.oms.persistence.interfaces.conf.workturn.bizmode.log.PlatBizModeLogDao;
import com.zmn.oms.services.interfaces.conf.workturn.bizmode.log.PlatBizModeLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class PlatBizModelLogServiceImpl implements PlatBizModeLogService {

    @Resource
    PlatBizModeLogDao platBizModeLogDao;

    @Override
    public PlatBizModeLog findByKey(Integer id) {
        return platBizModeLogDao.findByKey(id);
    }

    @Override
    public List<PlatBizModeLog> listPageByQuery(PlatBizModeLogQuery query) {
        int count = countByQuery(query);
        query.setTotalCount(count);
        return platBizModeLogDao.listPageByQuery(query);
    }

    @Override
    public List<PlatBizModeLog> listByQuery(PlatBizModeLogQuery query) {
        return platBizModeLogDao.listByQuery(query);
    }

    @Override
    public List<PlatBizModeLog> listAll() {
        return platBizModeLogDao.listAll();
    }

    @Override
    public Integer countByQuery(PlatBizModeLogQuery query) {
        return platBizModeLogDao.countByQuery(query);
    }

    @Override
    public Integer updateByKey(PlatBizModeLog platBizModeLog) {
        return platBizModeLogDao.updateByKey(platBizModeLog);
    }

    @Override
    public Integer insert(PlatBizModeLog platBizModeLog) {
        return platBizModeLogDao.insert(platBizModeLog);
    }

    @Override
    public Integer deleteByKey(Integer id) {
        return platBizModeLogDao.deleteByKey(id);
    }

}